package com.manage.demo.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.manage.demo.dao.CourseinfoMapper;

@Service
@Transactional
public class CourseinfoService {
	
	@Autowired
	private CourseinfoMapper CourseinfoMapper;

	public List<String> getGrades(){
		return CourseinfoMapper.getGrades();
	}
	
	public List<Map<String, Object>> getclasslist(String classes, String grades, String tchid, String tchname, int limit, int offset){
		return CourseinfoMapper.getclasslist(classes, grades, tchid, tchname, limit, offset);
	}
	
	public List<Map<String, Object>> getclassCount(String classes, String grades, String tchid, String tchname) {
		return CourseinfoMapper.getclassCount(classes, grades, tchid, tchname);
	}

	public List<Map<String, String>> getTchId() {
		return CourseinfoMapper.getTchId();
	}

	public List<Map<String, String>> getChineseTchId() {
		return CourseinfoMapper.getChineseTchId();
	}

	public List<Map<String, String>> getMathTchId() {
		return CourseinfoMapper.getMathTchId();
	}

	public List<Map<String, String>> getEnglishTchId() {
		return CourseinfoMapper.getEnglishTchId();
	}

	public List<Map<String, String>> getPhysicsTchId() {
		return CourseinfoMapper.getPhysicsTchId();
	}

	public List<Map<String, String>> getChemistryTchId() {
		return CourseinfoMapper.getChemistryTchId();
	}

	@Transactional
	public Integer updateclass(String tch_id, String id) {
		return CourseinfoMapper.updateclass(tch_id, id);
	}

}
